fix(cua-driver-rs)(linux): set_config {key,value} now persists (Closes #1923) - #1928
Conversation
…#1923) The Linux SetConfigTool only read the legacy per-field shape (`{"capture_mode": ...}`, `{"max_image_dimension": ...}`). Callers (Swift/macOS and Windows) send the `{"key": "...", "value": ...}` shape, so a write like `{"key":"max_image_dimension","value":800}` was silently dropped — get_config kept reporting the default 1568. Same for capture_mode. Mirror the Windows SetConfigTool: dispatch on `key` to the same four known fields (capture_mode, max_image_dimension, experimental_pip, experimental_pip_geometry) with per-type validation, then fall through to the existing legacy per-field handling so both shapes work. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughFixes a Linux-only bug where Changesset_config {key,value} Fix and Regression Test
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Linux visual regression artifactsMatrix jobs now run independently. Download visual artifacts from this workflow run.
|
Regression coverage for #1923 (fixed in #1928): a {key, value} set_config write was silently dropped on Linux. Boots a NixOS VM, writes via the {key, value} shape over MCP stdio, then reads back with get_config and asserts max_image_dimension/capture_mode persisted. Wired as the cua-driver-set-config flake check and a nix-build.yml matrix entry. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Problem
Closes #1923.
set_config '{"key":"max_image_dimension","value":800}'echoed the config back but the value never applied —get_configkept reporting the default1568. Same forcapture_mode. Windows'set_configworks with the identical{key,value}shape.Root cause
The Linux
SetConfigToolonly read the legacy per-field shape (top-levelcapture_mode/max_image_dimensionkeys). The{key, value}shape that the Swift/macOS and Windows callers send was never inspected, so the write was silently dropped.Fix
Mirror the Windows
SetConfigTool: dispatch onkeyto the same four known fields (capture_mode,max_image_dimension,experimental_pip,experimental_pip_geometry) with per-type validation, then fall through to the existing legacy per-field handling so both shapes work.get_confignow reflects the written value immediately.Verification
cd-rust-cua-driver.ymllinux-x86_64 build (compile).set_config {"key":"max_image_dimension","value":800}thenget_configshows800; same forcapture_mode.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
{ "key", "value" }JSON input format for configuration updates, enabling persistence of settings like capture mode and image dimensions.Tests